package com.ybkj.o2o.sales.entity;

import java.util.Date;

/**
 * 活动.
 * 
 * @author Shine
 * 
 */
public class ActivityManage extends Base {
  /**
   * 版本号.
   */
  private static final long serialVersionUID = 1L;

  public static final int ACTIVITY_STATUS_NOTSTART = 0;
  public static final int ACTIVITY_STATUS_ONUSING = 1;
  public static final int ACTIVITY_STATUS_OVERDUE = 2;

  private String centreActivityImage;// 活动中心图片

  private String businessActivityImage;// 业务弹窗图片图片

  private String chainedAddress;// 链接地址

  private ServiceType serviceType;// 业务类型

  private Long sort;// 排序

  private String showLocation;// 展示位置

  private Date start;// 开始时间

  private Date end;// 结束时间

  private String companyIds;// 公司id

  private String companyName;// 公司名称

  private Long companyId;// 创建人公司id

  private String appKey;



  public String getCompanyIds() {
    return companyIds;
  }

  public void setCompanyIds(String companyIds) {
    this.companyIds = companyIds;
  }

  public Long getCompanyId() {
    return companyId;
  }

  public void setCompanyId(Long companyId) {
    this.companyId = companyId;
  }

  public String getCompanyName() {
    return companyName;
  }

  public void setCompanyName(String companyName) {
    this.companyName = companyName;
  }

  public String getCentreActivityImage() {
    return centreActivityImage;
  }

  public void setCentreActivityImage(String centreActivityImage) {
    this.centreActivityImage = centreActivityImage;
  }

  public String getBusinessActivityImage() {
    return businessActivityImage;
  }

  public void setBusinessActivityImage(String businessActivityImage) {
    this.businessActivityImage = businessActivityImage;
  }

  public Date getStart() {
    return start;
  }

  public void setStart(Date start) {
    this.start = start;
  }

  /**
   * 根据时间返回状态.
   * @return Integer
   */
  public Integer getTimeStatus() {
    if (start.getTime() > new Date().getTime()) {
      return ACTIVITY_STATUS_NOTSTART;
    } else if (null != end && end.getTime() < new Date().getTime()) {
      return ACTIVITY_STATUS_OVERDUE;
    } else {
      return ACTIVITY_STATUS_ONUSING;
    }
  }

  public Date getEnd() {
    return end;
  }

  public void setEnd(Date end) {
    this.end = end;
  }

  public String getChainedAddress() {
    return chainedAddress;
  }

  public void setChainedAddress(String chainedAddress) {
    this.chainedAddress = chainedAddress;
  }

  public ServiceType getServiceType() {
    return serviceType;
  }

  public void setServiceType(ServiceType serviceType) {
    this.serviceType = serviceType;
  }

  public Long getSort() {
    return sort;
  }

  public void setSort(Long sort) {
    this.sort = sort;
  }


  public String getShowLocation() {
    return showLocation;
  }

  public void setShowLocation(String showLocation) {
    this.showLocation = showLocation;
  }

  public String getAppKey() {
    return appKey;
  }

  public void setAppKey(String appKey) {
    this.appKey = appKey;
  }



  public enum ServiceType {
    /**
     * 代驾.
     */
    daijia,
    /**
     * 专车.
     */
    zhuanche,
    /**
     * 跑腿.
     */
    paotui,
    /**
     * 货运.
     */
    freight,
    /**
     * 专线.
     */
    zhuanxian

  }



}
